package cn.edu.scau.cmi.zengGuanSheng.singleton;

public class Chairman1 {
	private static Chairman1 chairman;
	private String name;

	private Chairman1(String name) {
		this.name=name;
	}

	public static Chairman1 getInstance(String name) {
//		Chairman chairman = null;
		if (chairman == null) {
			chairman=new Chairman1(name);
			return chairman;
		} else
			return chairman;

	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public static Chairman1 getChairman1() {
		return chairman;
	}
	
	//这个方法本不应存在，这是不合理的
	public static void setChairman1(Chairman1 ch) {
		Chairman1.chairman = ch;
	}
}
